package com.zrf.springCloudTest.api;

import com.zrf.springCloudTest.api.impl.ComputeClientHystrix;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 提供者api
 * @author zrf
 *         Created by zrf on 2016/8/29.
 */
@FeignClient(value = "compute-service", fallback = ComputeClientHystrix.class)
public interface ComputeClient {

    /**
     * 方法a+b
     * @param a 参数a
     * @param b 参数b
     * @return a+b
     */
    @RequestMapping("add")
    Integer add(@RequestParam("a") Integer a, @RequestParam("b") Integer b);
}
